package high.concurrent.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import high.concurrent.model.CouponRecordDO;
import org.springframework.data.repository.query.Param;

import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 黄保泽
 * @since 2021-07-17
 */
public interface CouponRecordMapper extends BaseMapper<CouponRecordDO> {

    /**
     * 锁定优惠券
     * @param paramMap
     * @return
     */
    int lockCouponRecord(@Param("paramMap") Map paramMap);

    /**
     * 更新优惠券状态
     * @param mapParam
     */
    void updateState(@Param("mapParam") Map<String, Object> mapParam);
}
